package cn.iocoder.yudao.boot.common.constant;

import cn.iocoder.yudao.boot.common.exception.ErrorCode;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.http.HttpStatus;

/**
 * 错误码对象
 */
@Getter
@AllArgsConstructor
public enum BaseErrorCode implements ErrorCode {
    SUCCESS(HttpStatus.OK, "Success", "ok", null),
    SYSTEM_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "SystemError", "系统错误", null),
    PARAMETER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "ParameterError", "参数错误", null),
    SERVIE_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "ServiceError", "业务逻辑错误", null);
    ;

    private HttpStatus httpStatus;
    private final String code;
    private final String msg;
    private final ErrorCode parent;
}
